package com.example.deepseek.demos.web;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class DeepSeekRequest {
    public static final Message systemMessage = new Message("system","你是一个专业的化妆品零售行业助手,你的名字叫'李晨跃',你会帮助购买者解答疑问");

    private List<Message> messages = new ArrayList<Message>(1);
    private String model = "deepseek-chat";
    private int frequencyPenalty = 0;
    private int maxTokens = 4096;
    private int presencePenalty = 0;
    private ResponseFormat responseFormat = new ResponseFormat();
    private String stop = null;
    //流式响应，如果是false，会一直等待最终结果，如果是true，可以一点点的返回内容，不至于一直“等待”
    private boolean stream = false;
    private Object streamOptions = null;  // 使用Object因为可能是任意类型或null
    private double temperature = 1;
    private double topP = 1.0;
    private Object tools = null;          // 同上
    private String toolChoice = "none";
    private boolean logprobs = false;
    private Object topLogprobs = null;    // 同上


    @Data
    public static class Message {
        Message(){};
        Message(String role,String content){
            this.content = content;
            this.role = role;
        };
        //提示词
        private String content;
        //system：大模型的角色：比如"你是一个专业的化妆品零售行业助手,你会帮助购买者解答疑问"
        //user：用户提问的内容
        private String role;
    }


    @Data
    public static class ResponseFormat {
        private String type = "text";
    }

}
